<script setup lang="ts">
import { transfromToComponentProps, imageStylePropNames, imageDefaultProps } from '../../defaultProps'
import { useComponentCommon } from '../../hooks/useComponentCommon'

const props = defineProps({
  ...transfromToComponentProps(imageDefaultProps)
})

const { styleProps, handleClick } = useComponentCommon(props, imageStylePropNames)
</script>

<template>
  <img class="l-image-component" :style="styleProps" :src="props.src" @click="handleClick" />
</template>

<style scoped lang="scss">
.l-image-component {
  max-width: 100%;
  position: relative !important;
}
</style>
